<?php

namespace App\Helpers;

use App\Services\Http;

class HttpHelper
{
    private static $httpService;

    public static function getInstance()
    {
        if (!self::$httpService) {
            self::$httpService = new Http();
        }
        return self::$httpService;
    }

    public static function get(string $url, array $options = []): array
    {
        return self::getInstance()->get($url, $options);
    }

    public static function post(string $url, array $data = [], array $options = []): array
    {
        return self::getInstance()->post($url, $data, $options);
    }
}
